<?php
/**
 * Bind request object
 * 
 * @package stanza.iq.bind
 */
class Zend_Jabber_Stanza_Request_Iq_Bind_Set extends Zend_Jabber_Stanza_Request_Iq_Bind_Abstract {
    /**
     * Create new bind request
     * 
     * @param Zend_Jabber_User $user Current jabber user
     */
    public function __construct(Zend_Jabber_User $user) {
        parent::__construct();
        
        $bind = $this->dom->createElement('bind');
        $bind->setAttribute('xmlns', $this->getNamespace());
        
        $resourceNode = $this->dom->createElement('resource', $user->getResource());
        
        $bind->appendChild($resourceNode);
        $this->iqNode->appendChild($bind);
    }
}
?>